home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’93 / OK, What was that again? / Application / WWT.r < prev   
Encoding:
Text File  |  1993-06-18  |  3.7 KB  |  179 lines  |  [TEXT/MPS ]

  1. #include "Types.r"
  2.  
  3. #include "WWT.h"
  4.  
  5.  
  6. /* we use an MBAR resource to conveniently load all the menus */
  7.  
  8. resource 'MBAR' (rMenuBar, preload) {
  9.     { mApple, mFile, mEdit };    /* four menus */
  10. };
  11.  
  12.  
  13. resource 'MENU' (mApple, preload) {
  14.     mApple, textMenuProc,
  15.     AllItems & ~MenuItem2,    /* Disable dashed line, enable About and DAs */
  16.     enabled, apple,
  17.     {
  18.         "About What Was That?",noicon, nokey, nomark, plain;
  19.         "-",noicon, nokey, nomark, plain
  20.     }
  21. };
  22.  
  23. resource 'MENU' (mFile, preload) {
  24.     mFile, textMenuProc,
  25.     MenuItem12,                /* enable Quit only, program enables others */
  26.     enabled, "File",
  27.     {
  28.         "New",        noicon, "N", nomark, plain;
  29.         "Open",        noicon, "O", nomark, plain;
  30.         "-",         noicon, nokey, nomark, plain;
  31.         "Close",     noicon, "W", nomark, plain;
  32.         "Save",        noicon, "S", nomark, plain;
  33.         "Save As…",    noicon, nokey, nomark, plain;
  34.         "Revert",    noicon, nokey, nomark, plain;
  35.         "-",        noicon, nokey, nomark, plain;
  36.         "Page Setup…",noicon, nokey, nomark, plain;
  37.         "Print…",    noicon, nokey, nomark, plain;
  38.         "-",        noicon, nokey, nomark, plain;
  39.         "Quit",        noicon, "Q", nomark, plain
  40.     }
  41. };
  42.  
  43. resource 'MENU' (mEdit, preload) {
  44.     mEdit, textMenuProc,
  45.     NoItems,                /* disable everything, program does the enabling */
  46.     enabled, "Edit",
  47.      {
  48.         "Undo",noicon, "Z", nomark, plain;
  49.         "-",noicon, nokey, nomark, plain;
  50.         "Cut",noicon, "X", nomark, plain;
  51.         "Copy",noicon, "C", nomark, plain;
  52.         "Paste",noicon, "V", nomark, plain;
  53.         "Clear",noicon, nokey, nomark, plain
  54.     }
  55. };
  56.  
  57.  
  58. /* About Box */
  59. resource 'ALRT' (128, purgeable) {
  60.     {40, 20, 160, 290},
  61.     128,
  62.     {    /* array: 4 elements */
  63.         /* [1] */
  64.         OK, visible, silent,
  65.         /* [2] */
  66.         OK, visible, silent,
  67.         /* [3] */
  68.         OK, visible, silent,
  69.         /* [4] */
  70.         OK, visible, silent
  71.     }
  72. };
  73.  
  74. /* Error alert */
  75. resource 'ALRT' (129, purgeable) {
  76.     {40, 20, 166, 282},
  77.     129,
  78.     {    /* array: 4 elements */
  79.         /* [1] */
  80.         OK, visible, silent,
  81.         /* [2] */
  82.         OK, visible, silent,
  83.         /* [3] */
  84.         OK, visible, silent,
  85.         /* [4] */
  86.         OK, visible, silent
  87.     }
  88. };
  89.  
  90.  
  91. resource 'DITL' (128, purgeable) {
  92.     {    /* array DITLarray: 5 elements */
  93.         /* [1] */
  94.         {91, 174, 111, 254},
  95.         Button {
  96.             enabled,
  97.             "OK"
  98.         },
  99.         /* [2] */
  100.         {17, 7, 33, 213},
  101.         StaticText {
  102.             disabled,
  103.             "OK, OK, OK, what was that?"
  104.         },
  105.         /* [3] */
  106.         {0, 192, 14, 271},
  107.         StaticText {
  108.             disabled,
  109.             "Freeware"
  110.         },
  111.         /* [4] */
  112.         {36, 7, 52, 135},
  113.         StaticText {
  114.             disabled,
  115.             "Brought to you by:"
  116.         },
  117.         /* [5] */
  118.         {53, 23, 85, 262},
  119.         StaticText {
  120.             disabled,
  121.             "Parent, Correia, Boyd, Kledzik & Traut, Programm"
  122.             "ers at play"
  123.         }
  124.     }
  125. };
  126.  
  127. resource 'DITL' (129, purgeable) {
  128.     {    /* array DITLarray: 3 elements */
  129.         /* [1] */
  130.         {99, 169, 119, 249},
  131.         Button {
  132.             enabled,
  133.             "OK"
  134.         },
  135.         /* [2] */
  136.         {15, 60, 83, 230},
  137.         StaticText {
  138.             disabled,
  139.             "The programmers made a mistake, and woul"
  140.             "d like to take this opportunity to apolo"
  141.             "gize."
  142.         },
  143.         /* [3] */
  144.         {8, 8, 40, 40},
  145.         Icon {
  146.             disabled,
  147.             2
  148.         }
  149.     }
  150. };
  151.  
  152.  
  153.  
  154. /* here is the quintessential MultiFinder friendliness device, the SIZE resource */
  155.  
  156. resource 'SIZE' (-1) {
  157.     dontSaveScreen,
  158.     acceptSuspendResumeEvents,
  159.     enableOptionSwitch,
  160.     canBackground,                /* we can background; we don't currently, but our sleep value */
  161.                                 /* guarantees we don't hog the Mac while we are in the background */
  162.     multiFinderAware,            /* this says we do our own activate/deactivate; don't fake us out */
  163.     backgroundAndForeground,    /* this is definitely not a background-only application! */
  164.     dontGetFrontClicks,            /* change this is if you want "do first click" behavior like the Finder */
  165.     ignoreChildDiedEvents,        /* essentially, I'm not a debugger (sub-launching) */
  166.     not32BitCompatible,            /* this app should not be run in 32-bit address space */
  167.     reserved,
  168.     reserved,
  169.     reserved,
  170.     reserved,
  171.     reserved,
  172.     reserved,
  173.     reserved,
  174.     kPrefSize * 1024,
  175.     kMinSize * 1024    
  176. };
  177.  
  178. /* derez 'What was that?' -only BNDL Types.r */
  179.